package cn.tedu._01mvcboot01.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
public class UserController {
    @GetMapping("/login")
    @ResponseBody
    public String login(String username,String password){
        System.out.println("用户信息---" + username + ":" + password);
        return "登录成功";
    }

    @PostMapping("/reg/{username}/{password}")
    @ResponseBody
    public String reg(@PathVariable String username,@PathVariable String password){
        System.out.println("用户信息---" + username + ":" + password);
        return "注册成功";
    }
}
